import pandas as pd
from snownlp import SnowNLP

data1 = pd.read_csv('../data_csv/comment/merged_comments.csv', encoding='utf-8')

data1['emotion'] = data1['PL'].apply(lambda x: SnowNLP(x).sentiments)

data1.to_csv('评论情感打分值.csv', index=False)  # 保存数据，具体数据看表格
